<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <title>待发货</title>
     <link rel="icon" href="assets/img/favicon.ico">

    <link rel="stylesheet" type="text/css" href="css/webbase.css" />
    <link rel="stylesheet" type="text/css" href="css/pages-seckillOrder.css" />
</head>

<body>
    <!-- 头部栏位 -->
    <!--页面顶部-->
<div id="nav-bottom">
	<!--顶部-->
	<div class="nav-top">
		<div class="top">
			<div class="py-container">
				<div class="shortcut">
					<ul class="fl">
						<li class="f-item">东东商城欢迎您！</li>
						<li class="f-item">请<a href="/toLogin" target="_blank">登录</a>　<span><a href="register.html" target="_blank">免费注册</a></span></li>
					</ul>
					<ul class="fr">
						<li class="f-item">我的订单</li>
						<li class="f-item space"></li>
						<li class="f-item"><a href="home.html" target="_blank">我的东东商城</a></li>
						<li class="f-item space"></li>
						<li class="f-item">东东商城会员</li>
						<li class="f-item space"></li>
						<li class="f-item">企业采购</li>
						<li class="f-item space"></li>
						<li class="f-item">关注东东商城</li>
						<li class="f-item space"></li>
						<li class="f-item" id="service">
							<span>客户服务</span>
							<ul class="service">
								<li><a href="cooperation.html" target="_blank">合作招商</a></li>
								<li><a href="shoplogin.html" target="_blank">商家后台</a></li>
								<li><a href="cooperation.html" target="_blank">合作招商</a></li>
								<li><a href="#">商家后台</a></li>
							</ul>
						</li>
						<li class="f-item space"></li>
						<li class="f-item">网站导航</li>
					</ul>
				</div>
			</div>
		</div>

		<!--头部-->
		<div class="header">
			<div class="py-container">
				<div class="yui3-g Logo">
					<div class="yui3-u Left logoArea">
						<a class="logo-bd" title="东东商城" href="JD-index.html" target="_blank"></a>
					</div>
					<div class="yui3-u Center searchArea">
						<div class="search">
							<form action="" class="sui-form form-inline">
								<!--searchAutoComplete-->
								<div class="input-append">
									<input  id="autocomplete" type="text" class="input-error input-xxlarge" />
									<button class="sui-btn btn-xlarge btn-danger" type="button">搜索</button>
								</div>
							</form>
						</div>
						<div class="hotwords">
							<ul>
								<li class="f-item">东东商城首发</li>
								<li class="f-item">亿元优惠</li>
								<li class="f-item">9.9元团购</li>
								<li class="f-item">每满99减30</li>
								<li class="f-item">亿元优惠</li>
								<li class="f-item">9.9元团购</li>
								<li class="f-item">办公用品</li>

							</ul>
						</div>
					</div>
					<div class="yui3-u Right shopArea">
						<div class="fr shopcar">
							<div class="show-shopcar" id="shopcar">
								<span class="car"></span>
								<a class="sui-btn btn-default btn-xlarge" href="cart" target="_blank">
									<span>我的购物车</span>
									<i class="shopnum">0</i>
								</a>
								<div class="clearfix shopcarlist" id="shopcarlist" style="display:none">
									<p>"啊哦，你的购物车还没有商品哦！"</p>
									<p>"啊哦，你的购物车还没有商品哦！"</p>
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="yui3-g NavList">
					<div class="yui3-u Left all-sort">
						<h4>全部商品分类</h4>
					</div>
					<div class="yui3-u Center navArea">
						<ul class="nav">
							<li class="f-item">服装城</li>
							<li class="f-item">美妆馆</li>
							<li class="f-item">东东超市</li>
							<li class="f-item">全球购</li>
							<li class="f-item">闪购</li>
							<li class="f-item">团购</li>
							<li class="f-item">有趣</li>
							<li class="f-item"><a href="seckill-index.html" target="_blank">秒杀</a></li>
						</ul>
					</div>
					<div class="yui3-u Right"></div>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript" src="js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
	$("#service").hover(function(){
		$(".service").show();
	},function(){
		$(".service").hide();
	});
	$("#shopcar").hover(function(){
		$("#shopcarlist").show();
	},function(){
		$("#shopcarlist").hide();
	});

})
</script>
<script type="text/javascript" src="js/plugins/jquery.easing/jquery.easing.min.js"></script>
<script type="text/javascript" src="js/plugins/sui/sui.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery-placeholder/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="js/widget/nav.js"></script>
</body>
    <!--header-->
    <div id="account">
        <div class="py-container">
            <div class="yui3-g home">
                <!--左侧列表-->
                <div class="yui3-u-1-6 list">

                    <div class="person-info">
                        <div class="person-photo"><img src="img/_/photo.png" alt=""></div>
                        <div class="person-account">
                            <span class="name">Michelle</span>
                            <span class="safe">账户安全</span>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="list-items">
                        <dl>
                            <dt><i>·</i> 订单中心</dt>
                            <dd ><a href="homeIndex"  class="list-active" >我的订单</a></dd>
                            <dd><a href="home_order_pay" >待付款</a></dd>
                            <dd><a href="home_order_send"  >待发货</a></dd>
                            <dd><a href="home_order_receive" >待收货</a></dd>
                            <dd><a href="home_order_evaluate" >待评价</a></dd>
                        </dl>
						<dl>
							<dt><i>·</i> 我的中心</dt>
							<dd><a href="home-person-collect.html">我的收藏</a></dd>
							<dd><a href="home-person-footmark.html">我的足迹</a></dd>
						</dl>
						<dl>
							<dt><i>·</i> 物流消息</dt>
						</dl>
                        <dl>
                            <dt><i>·</i> 设置</dt>
                            <dd><a href="homeSettingInfo">个人信息</a></dd>
                            <dd><a href="homeSettingAddress"  >地址管理</a></dd>
                            <dd><a href="homeSettingSafe" >安全管理</a></dd>
                        </dl>
                    </div>
                </div>
                <!--右侧主内容-->
                <div class="yui3-u-5-6 order-pay">
                    <div class="body">
                        <div class="table-title">
                            <table class="sui-table  order-table">
                                <tr>
                                    <thead>
                                        <th width="35%">宝贝</th>
                                        <th width="5%">单价</th>
                                        <th width="5%">数量</th>
                                        <th width="8%">商品操作</th>
                                        <th width="10%">实付款</th>
                                        <th width="10%">交易状态</th>
                                        <th width="10%">交易操作</th>
                                    </thead>
                                </tr>
                            </table>
                        </div>
                        <div class="order-detail">
                            <div class="orders" id="detail">
                                <div class="choose-order">
                                    <div class="sui-pagination pagination-large top-pages">
                                        <ul>
                                            <li class="prev disabled"><a href="#">上一页</a></li>

                                            <li class="next"><a href="#">下一页</a></li>
                                        </ul>
                                    </div>
                                </div>

                            </div>
                            <div class="choose-order">

                                <div class="sui-pagination pagination-large top-pages">
                                    <ul>
                                        <li class="prev disabled"><a href="#">«上一页</a></li>
                                        <li class="active"><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li class="dotted"><span>...</span></li>
                                        <li class="next"><a href="#">下一页»</a></li>
                                    </ul>
                                    <div><span>共10页&nbsp;</span><span>
                                            到
                                            <input type="text" class="page-num"><button class="page-confirm" onclick="alert(1)">确定</button>
                                            页</span></div>
                                </div>
                            </div>

                            <div class="clearfix"></div>
                        </div>

                        <div class="like-title">
                            <div class="mt">
                                <span class="fl"><strong>热卖单品</strong></span>
                            </div>
                        </div>
                        <div class="like-list">
                            <ul class="yui3-g">
                                <li class="yui3-u-1-4">
                                    <div class="list-wrap">
                                        <div class="p-img">
                                            <img src="img/_/itemlike01.png" />
                                        </div>
                                        <div class="attr">
                                            <em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
                                        </div>
                                        <div class="price">
                                            <strong>
											<em>¥</em>
											<i>3699.00</i>
										</strong>
                                        </div>
                                        <div class="commit">
                                            <i class="command">已有6人评价</i>
                                        </div>
                                    </div>
                                </li>
                                <li class="yui3-u-1-4">
                                    <div class="list-wrap">
                                        <div class="p-img">
                                            <img src="img/_/itemlike02.png" />
                                        </div>
                                        <div class="attr">
                                            <em>Apple苹果iPhone 6s/6s Plus 16G 64G 128G</em>
                                        </div>
                                        <div class="price">
                                            <strong>
											<em>¥</em>
											<i>4388.00</i>
										</strong>
                                        </div>
                                        <div class="commit">
                                            <i class="command">已有700人评价</i>
                                        </div>
                                    </div>
                                </li>
                                <li class="yui3-u-1-4">
                                    <div class="list-wrap">
                                        <div class="p-img">
                                            <img src="img/_/itemlike03.png" />
                                        </div>
                                        <div class="attr">
                                            <em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
                                        </div>
                                        <div class="price">
                                            <strong>
											<em>¥</em>
											<i>4088.00</i>
										</strong>
                                        </div>
                                        <div class="commit">
                                            <i class="command">已有700人评价</i>
                                        </div>
                                    </div>
                                </li>
                                <li class="yui3-u-1-4">
                                    <div class="list-wrap">
                                        <div class="p-img">
                                            <img src="img/_/itemlike04.png" />
                                        </div>
                                        <div class="attr">
                                            <em>DELL戴尔Ins 15MR-7528SS 15英寸 银色 笔记本</em>
                                        </div>
                                        <div class="price">
                                            <strong>
											<em>¥</em>
											<i>4088.00</i>
										</strong>
                                        </div>
                                        <div class="commit">
                                            <i class="command">已有700人评价</i>
                                        </div>
                                    </div>
                                </li>

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 底部栏位 -->
<!--退款模态框-->
<div tabindex="-1" role="dialog" data-hasfoot="false" class="sui-modal hide fade refund"
	 style="width:580px;">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" data-dismiss="modal" aria-hidden="true" class="sui-close">×
				</button>
				<h4  class="modal-title">退款</h4>
			</div>
			<div class="modal-body">
				<form action="" class="sui-form form-horizontal" id="refundFrom">
					<input type="hidden" name="id">
					<div class="control-group">
						<label class="control-label">支付订单号：</label>
						<div class="controls">
							<input type="text" id="outTradeNo" name="WIDTRout_trade_no" class="input-large" disabled>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">支付宝交易流水号：</label>
						<div class="controls">
							<input type="text" id="tradeNo" name="WIDTRtrade_no" class="input-large" disabled>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">退款请求号：</label>
						<div class="controls">
							<input type="text" id="requestNo" name="WIDTRout_request_no" class="input-large" disabled>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">退款金额：</label>
						<div class="controls">
							<input type="text" id="refundAmount" name="WIDTRrefund_amount" class="input-large" >
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">退款原因：</label>
						<div class="controls">
                            <textarea name="WIDTRrefund_reason" id="refundReason">

                            </textarea>
						</div>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" onclick="refund()" data-ok="modal" id="updateButton"
						class="sui-btn btn-primary btn-large">确定
				</button>
				<button type="button" data-dismiss="modal" class="sui-btn btn-default btn-large">
					取消
				</button>
			</div>
		</div>
	</div>
</div>

<!--订单详情-->
<div tabindex="-1" role="dialog" data-hasfoot="false" class="sui-modal hide fade refund"
	 style="width:580px;">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" data-dismiss="modal" aria-hidden="true" class="sui-close">×
				</button>
				<h4  class="modal-title">退款</h4>
			</div>
			<div class="modal-body">
				<form action="" class="sui-form form-horizontal" id="refundFrom">
					<input type="hidden" name="id">
					<div class="control-group">
						<label class="control-label">支付订单号：</label>
						<div class="controls">
							<input type="text" id="outTradeNo" name="WIDTRout_trade_no" class="input-large" disabled>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">支付宝交易流水号：</label>
						<div class="controls">
							<input type="text" id="tradeNo" name="WIDTRtrade_no" class="input-large" disabled>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">退款请求号：</label>
						<div class="controls">
							<input type="text" id="requestNo" name="WIDTRout_request_no" class="input-large" disabled>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">退款金额：</label>
						<div class="controls">
							<input type="text" id="refundAmount" name="WIDTRrefund_amount" class="input-large" >
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">退款原因：</label>
						<div class="controls">
                            <textarea name="WIDTRrefund_reason" id="refundReason">

                            </textarea>
						</div>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" onclick="refund()" data-ok="modal" id="updateButton"
						class="sui-btn btn-primary btn-large">确定
				</button>
				<button type="button" data-dismiss="modal" class="sui-btn btn-default btn-large">
					取消
				</button>
			</div>
		</div>
	</div>
</div>
    <!--页面底部-->
<div class="clearfix footer">
	<div class="py-container">
		<div class="footlink">
			<div class="Mod-service">
				<ul class="Mod-Service-list">
					<li class="grid-service-item intro  intro1">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item  intro intro2">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item intro  intro3">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item  intro intro4">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
					<li class="grid-service-item intro intro5">

						<i class="serivce-item fl"></i>
						<div class="service-text">
							<h4>正品保障</h4>
							<p>正品保障，提供发票</p>
						</div>

					</li>
				</ul>
			</div>
			<div class="clearfix Mod-list">
				<div class="yui3-g">
					<div class="yui3-u-1-6">
						<h4>购物指南</h4>
						<ul class="unstyled">
							<li>购物流程</li>
							<li>会员介绍</li>
							<li>生活旅行/团购</li>
							<li>常见问题</li>
							<li>购物指南</li>
						</ul>

					</div>
					<div class="yui3-u-1-6">
						<h4>配送方式</h4>
						<ul class="unstyled">
							<li>上门自提</li>
							<li>211限时达</li>
							<li>配送服务查询</li>
							<li>配送费收取标准</li>
							<li>海外配送</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>支付方式</h4>
						<ul class="unstyled">
							<li>货到付款</li>
							<li>在线支付</li>
							<li>分期付款</li>
							<li>邮局汇款</li>
							<li>公司转账</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>售后服务</h4>
						<ul class="unstyled">
							<li>售后政策</li>
							<li>价格保护</li>
							<li>退款说明</li>
							<li>返修/退换货</li>
							<li>取消订单</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>特色服务</h4>
						<ul class="unstyled">
							<li>夺宝岛</li>
							<li>DIY装机</li>
							<li>延保服务</li>
							<li>东东商城E卡</li>
							<li>东东商城通信</li>
						</ul>
					</div>
					<div class="yui3-u-1-6">
						<h4>帮助中心</h4>
						<img src="img/wx_cz.jpg">
					</div>
				</div>
			</div>
			<div class="Mod-copyright">
				<ul class="helpLink">
					<li>关于我们<span class="space"></span></li>
					<li>联系我们<span class="space"></span></li>
					<li>关于我们<span class="space"></span></li>
					<li>商家入驻<span class="space"></span></li>
					<li>营销中心<span class="space"></span></li>
					<li>友情链接<span class="space"></span></li>
					<li>关于我们<span class="space"></span></li>
					<li>营销中心<span class="space"></span></li>
					<li>友情链接<span class="space"></span></li>
					<li>关于我们</li>
				</ul>
				<p>地址：北京市昌平区沙阳路18号 邮编：100000 电话：400-0123-302</p>
				<p>京ICP备08006666号京公网安备11010888888</p>
			</div>
		</div>
	</div>
</div>
<!--页面底部END-->
<script>
    $(function () {
        getSend();
    })
    function getSend(){
        $.get("/orderController/getOrderSend",{},function (data) {
            if (data.code == 10000){
                var list = data.data
				console.log(list)
                var orderHtml = "";
                for (let i = 0; i < list.length; i++) {
                    list[i].order.createTime
                    orderHtml +='<div class="choose-title">'
                    orderHtml +='<label data-toggle="checkbox" class="checkbox-pretty ">'
                    orderHtml +='<input type="checkbox" checked="checked"><span>'+list[i].order.createTime+'　订单编号：'+list[i].order.orderNum+'  店铺：'+list[i].order.sellerId+' <a>和我联系</a></span>'
                    orderHtml +='</label>'
                    orderHtml +='<a class="sui-btn btn-info share-btn" >分享</a>'
                    orderHtml +='</div>'
                    var orderItems = list[i].orderItems;
                    for (let j = 0; j < orderItems.length; j++) {
                        orderHtml +='<table class="sui-table table-bordered order-datatable">'
                        orderHtml +='<tbody>'
                        orderHtml +='<tr>'
                        orderHtml +='<td width="35%">'
                        orderHtml +='<div class="typographic"><img src="'+orderItems[j].picPath+'" />'
                        orderHtml +='<a href="#" class="block-text">'+orderItems[j].title+'</a>'
                        // orderHtml +='<span class="guige">规格：温泉喷雾150ml</span>'
                        orderHtml +='</div>'
                        orderHtml +='</td>'
                        orderHtml +='<td width="5%" class="center">'
                        orderHtml +='<ul class="unstyled">'
                        orderHtml +='<li class="o-price">¥'+(orderItems[j].price+300)+'</li>'
                        orderHtml +='<li>¥'+orderItems[j].price+'</li>'
                        orderHtml +='</ul>'
                        orderHtml +='</td>'
                        orderHtml +='<td width="5%" class="center">'+orderItems[j].num+'</td>'
                        orderHtml +='<td width="8%" class="center">'
                        orderHtml +='<ul class="unstyled">'
                        orderHtml +='<li>已支付</li>'
                        orderHtml +='<li><a  onclick="refundWindow('+orderItems[j].orderId+','+list[i].order.orderNum+',\''+list[i].order.tardeNo+'\','+orderItems[j].price+')" class="sui-btn btn-info share-btn" data-target=\'.refund\' data-toggle=\'modal\' data-keyboard=\'false\' id=\'refund\'">退款</a></li>'
                        orderHtml +='</ul>'
                        orderHtml +='</td>'
                        orderHtml +='<td width="10%" class="center" rowspan="2">'
                        orderHtml +='<ul class="unstyled">'
                        orderHtml +='<li>¥'+(orderItems[j].totalFee)+'</li>'
                        orderHtml +='<li>（含运费：￥0.00）</li>'
                        orderHtml +='</ul>'
                        orderHtml +='</td>'
                        orderHtml +='<td width="10%" class="center" rowspan="2">'
                        orderHtml +='<ul class="unstyled">'
                        orderHtml +='<li>待发货</li>'
						//orderHtml +='<a onclick="queryDeal('+e.orderItems[0].orderNum+',\''+e.orderItems[0].tradeNum+'\')" type="button" class="sui-btn btn-info share-btn" data-target=\'.edit\' data-toggle=\'modal\' data-keyboard=\'false\' id=\'edit\'">订单详情</a>'
                        orderHtml +='<li><a href="alipayTradeQuery?WIDTQout_trade_no='+list[i].order.orderNum+'&WIDTQtrade_no='+list[i].order.tarde_no+'" class="btn">订单详情 </a></li>'
                        orderHtml +='</ul>'
                        orderHtml +='</td>'
                        orderHtml +='<td width="10%" class="center" rowspan="2">'
                        orderHtml +='<ul class="unstyled">'
                        orderHtml +='<li>还剩4天23时</li>'
                        orderHtml +='<li><a href="#" class="sui-btn btn-info">确认发货</a></li>'
                        orderHtml +='</ul>'
                        orderHtml +='</td>'
                        orderHtml +='</tr>'
                        orderHtml +='</tbody>'
                        orderHtml +='</table>'
                    }
                }

                $("#detail").append(orderHtml)
            }else{
                alert(data.message)
            }
        })
    }
	//退款弹窗
	function refundWindow(id,orderNum,tradeNum,price) {
		$("#outTradeNo").val(orderNum)
		$("#tradeNo").val(tradeNum)
		$("#requestNo").val(id)
		$("#refundAmount").val(price)
		$("#refundReason").val()
		console.log(id,orderNum,tradeNum,price)

	}
	//退款
	function refund() {
		$.ajax({
			url: "/alipayTradeRefund",
			data: {
				WIDTRout_trade_no:$("#outTradeNo").val(),
				WIDTRtrade_no:$("#tradeNo").val(),
				WIDTRout_request_no: $("#requestNo").val(),
				WIDTRrefund_amount:$("#refundAmount").val(),
				WIDTRrefund_reason:$("#refundReason").val()
			},
			type: "get",
			async: false,
			dataType: "json",
			success: function (data) {
				console.log(data)
				var list = data.alipay_trade_refund_response
				if (list.code == 10000) {
					alert("退款成功")
				}else {
					alert("退款异常")
				}
			}, error: function () {
				toastr.error("系统异常")
			}
		})
	}
</script>

</html>